package com.wys.mall.product;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * 开启检验：
 * 在entity上加 @NotBlank
 * 在controller方法中加 @Valid，如：public R save(@Valid @RequestBody BrandEntity brand){
 *
 * 统一异常处理
 *
 * srping.cache
 * @cacheable 保存缓存
 * @cacheEvict: 删除
 * @cacheput: 更新
 * @cacheing 组合多个缓存操作
 * @cacheConfig 共享相同的缓存的配置
 */
//@EnableCaching
@EnableFeignClients(basePackages = "com.wys.mall.product.feign")
@EnableRedisHttpSession
@EnableDiscoveryClient
@MapperScan("com.wys.mall.product.dao")
@SpringBootApplication
public class MallProductApplication {

    public static void main(String[] args) {
        SpringApplication.run(MallProductApplication.class, args);
    }

}
